
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemCityRequest struct {

	CityId string `json:"city_id" form:"city_id"`

	Level string `json:"level" form:"level"`

	ParentId string `json:"parent_id" form:"parent_id"`

	AreaCode string `json:"area_code" form:"area_code"`

	Name string `json:"name" form:"name"`

	MergerName string `json:"merger_name" form:"merger_name"`

	Lng string `json:"lng" form:"lng"`

	Lat string `json:"lat" form:"lat"`

	IsShow string `json:"is_show" form:"is_show"`

}

func (r *SystemCityRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemCityRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"city_id": "required",

		"level": "required",

		"parent_id": "required",

		"area_code": "required",

		"name": "required",

		"merger_name": "required",

		"lng": "required",

		"lat": "required",

		"is_show": "required",

	}
}

func (r *SystemCityRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemCityRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemCityRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
